<?php


namespace app\api\validate;


use think\Validate;

class FriendValidate extends Validate
{
    protected $rule = [
        "relation_id" => "require",
        "username" => "require",
        "phone" => "require|regex:^1[3-9][0-9]{9}$"
    ];

    protected $message = [
        "relation_id.require" => "亲属关系id不能为空",
        "username.require" => "姓名不能为空",
        "phone.require" => "手机号不能为空",
        "phone.regex" => "手机号格式不正确"
    ];
}